import React, { Component } from 'react'
import List from './components/List'

export default class App extends Component {
  render() {
    let arr = [1, 2, 3]
    let obj = { x: 1, y: 2, z: 3 }
    return (
      <div>
        App
        <hr />
        {/* arr写在组件子节点,也是传递props数据 */}
        {/* <List x={obj.x} y={obj.y} z={obj.z}>
          {arr}
        </List> */}
        {/* props批量传递对象数据 */}
        <List {...obj}>{arr}</List>
      </div>
    )
  }
}
